package com.iepacj.chain.demo1;

/**
 * Created by iEpac on 16/5/2.
 */
public class Client {

    public static void main(String[] args) {

        Handler h1 = new ConcreteHandler();
        Handler h2 = new ConcreteHandler();

        /**
         * h1的下家是h2
         * 如果有下家 就直接交给下家处理
         * 如果没有 就自己处理
         */
        h1.setSuccessor(h2);
        h1.handleRequest();

    }

}
